<?php


namespace app\api\validate;


use think\Validate;

class OrderRefundValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'order_refund_id' => ['require', 'gt:0'],
        'page' => ['require', 'gt:0'],
        'limit' => ['require', 'gt:0'],
        'express_name' => ['require'],
        'express_no' => ['require'],
    ];

    /**
     * 提示消息
     */
    protected $message = [];

    /**
     * 验证场景
     */
    protected $scene = [
        'cancelApplyRefund' => ['order_refund_id'],
        'getRefundOrderPageList' => ['page','limit'],
        'refundOrderDetail' => ['order_refund_id'],
        'editRefundOrder' => ['order_refund_id','express_name','express_no'],
        'deleteRefund' => ['order_refund_id'],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'order_refund_id' => '售后订单ID',
            'page' => '页码',
            'limit' => '条数',
            'express_name' => '快递公司名称',
            'express_no' => '快递单号',
        ];
        parent::__construct($rules, $message, $field);
    }
}